package demo.java.parallelprogram.collection;

import java.util.List;
import java.util.Random;

public class AccessListThread implements Runnable {
	protected String name;
	Random rand=new Random();
	public List list;
	
	@Override
	public void run() {
		try {
			for(int i=0;i<500;i++){
				getList(rand.nextInt(1000));
			}
			Thread.sleep(rand.nextInt(100));
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}

	public Object getList(int index) {
		return list.get(index);
	}

	public static void main(String[] args) {
	}
	
}
